package cn.xorange.commons.file.entity;

public enum FileCode {

    SUCCESS(0, 200,"请求成功"),
    FILE_OSS_UNIQUE_EXCEPTION(4201,500,"OSS配置不唯一，请检查"),
    FILE_OSS_NOT_FOUND(4202,500,"文件OSS not found"),
    FILE_NULL(4201,200,"没有上传文件"),
    FILE_NAME_EXCEPTION(4202,200,"文件名称不合法"),
    FILE_NAME_LENGTH(4203,200,"文件名称过长"),
    FILE_EXTENSION_EXCEPTION(4204,200,"文件类型不支持"),
    FILE_PATH_NULL(4205,200,"文件路径为空"),
    FILE_SIZE_LIMIT(4206,200,"文件需小于"),
    FILE_PATH_PREFIX_NULL(4207,200,"文件路径前缀为空"),
    FILE_UPLOAD_EXCEPTION(4208,500,"文件上传失败"),
    FILE_DELETE_EXCEPTION(4219,500,"文件删除失败");


    private int code;
    private int status;
    private String msg;

    FileCode(int code, int httpCode, String msg){
        this.code = code;
        this.status = httpCode;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }
    public int getStatus(){ return status; }
    public String getMsg() {
        return msg;
    }

    public void setCode(Integer code){
        this.code = code;
    }
    public void setStatus(Integer status){
        this.status = status;
    }
    public void setMsg(String msg){
        this.msg = msg;
    }
}
